package com.homedo.async.mysql.support.prepare;

import com.homedo.async.mysql.support.meta.EntityMetaData;
import com.homedo.async.mysql.support.prepare.select.RecordsCount2Sql4Select;
import lombok.Data;

/**
 * @author jgshun
 * @date 2020/3/5 1:56 PM
 */

@Data
public class PrepareRecordsCount2Sql<T> {

    private Iterable<T> records;
    private EntityMetaData<T> entityMetaData;
    private boolean includeNullVals;

    public PrepareRecordsCount2Sql() {
    }

    public PrepareRecordsCount2Sql(EntityMetaData<T> entityMetaData, Iterable<T> records, boolean includeNullVals) {
        this.entityMetaData = entityMetaData;
        this.records = records;
        this.includeNullVals = includeNullVals;
    }

    public Object[] prepare() {
        return RecordsCount2Sql4Select.prepare(this.entityMetaData, this.records, this.includeNullVals);
    }

}

